<template>
	<view class="fullPage p30">
		<view class="container p30 border-r1 bf">
			<view class="mb20">
				<view class="">请输入卡号</view>
				<label class="flex_a h80 bdb">
					<input type="text" class="flex1 pw0" v-model="cardNumber" cursor-spacing="10" placeholder="请输入您的卡号" placeholder-class="c9" />
				</label>
			</view>
			<view class="mb100 c6 ft26 lh40">提示：绑定成功后，即可使用IC卡支付充电费用，费用 从账户余额中扣除；</view>

			<view class="plr40"><u-button type="primary" shape="circle" @click="submit">绑定IC卡</u-button></view>
		</view>
	</view>
</template>

<script>
import {icBind} from "@/api/user.js"
export default {
	name: 'bindIc',
	data() {
		return {
			cardNumber: ''
		}
	},
	onLoad() {},
	methods: {
		async submit() {
			if(!this.cardNumber) {
				this.toast('请输入您的卡号')
			}
			const res = await icBind({cardNumber: this.cardNumber})
			await this.confirm({
				content: '绑定成功',
				showCancel: false
			})
			this.back()
		}
	}
}
</script>

<style lang="scss"></style>
